package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.JiajiaWorkerSettleScale;
import com.ruoyi.system.mapper.JiajiaWorkerSettleScaleMapper;
import com.ruoyi.system.service.IJiajiaWorkerSettleScaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社工结算比例阶梯Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-08
 */
@Service
public class JiajiaWorkerSettleScaleServiceImpl implements IJiajiaWorkerSettleScaleService
{
    @Autowired
    private JiajiaWorkerSettleScaleMapper jiajiaWorkerSettleScaleMapper;

    /**
     * 查询社工结算比例阶梯
     * 
     * @param id 社工结算比例阶梯主键
     * @return 社工结算比例阶梯
     */
    @Override
    public JiajiaWorkerSettleScale selectJiajiaWorkerSettleScaleById(Long id)
    {
        return jiajiaWorkerSettleScaleMapper.selectJiajiaWorkerSettleScaleById(id);
    }

    /**
     * 查询社工结算比例阶梯列表
     * 
     * @param jiajiaWorkerSettleScale 社工结算比例阶梯
     * @return 社工结算比例阶梯
     */
    @Override
    public List<JiajiaWorkerSettleScale> selectJiajiaWorkerSettleScaleList(JiajiaWorkerSettleScale jiajiaWorkerSettleScale)
    {
        return jiajiaWorkerSettleScaleMapper.selectJiajiaWorkerSettleScaleList(jiajiaWorkerSettleScale);
    }

    /**
     * 新增社工结算比例阶梯
     * 
     * @param jiajiaWorkerSettleScale 社工结算比例阶梯
     * @return 结果
     */
    @Override
    public int insertJiajiaWorkerSettleScale(JiajiaWorkerSettleScale jiajiaWorkerSettleScale)
    {
        jiajiaWorkerSettleScale.setCreateTime(DateUtils.getNowDate());
        return jiajiaWorkerSettleScaleMapper.insertJiajiaWorkerSettleScale(jiajiaWorkerSettleScale);
    }

    /**
     * 修改社工结算比例阶梯
     * 
     * @param jiajiaWorkerSettleScale 社工结算比例阶梯
     * @return 结果
     */
    @Override
    public int updateJiajiaWorkerSettleScale(JiajiaWorkerSettleScale jiajiaWorkerSettleScale)
    {
        jiajiaWorkerSettleScale.setUpdateTime(DateUtils.getNowDate());
        return jiajiaWorkerSettleScaleMapper.updateJiajiaWorkerSettleScale(jiajiaWorkerSettleScale);
    }

    /**
     * 批量删除社工结算比例阶梯
     * 
     * @param ids 需要删除的社工结算比例阶梯主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerSettleScaleByIds(String ids)
    {
        return jiajiaWorkerSettleScaleMapper.deleteJiajiaWorkerSettleScaleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除社工结算比例阶梯信息
     * 
     * @param id 社工结算比例阶梯主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerSettleScaleById(Long id)
    {
        return jiajiaWorkerSettleScaleMapper.deleteJiajiaWorkerSettleScaleById(id);
    }
}
